package com.code.pattern.decorator;

/**
 * @author: liyufei
 * @date: 2021-04-03 21:55
 */
public class DecoratorTest {

    public static void main(String[] args) {

        ABattercake aBattercake;
        aBattercake = new Battercake();
        aBattercake = new EggDecorator(aBattercake);
        aBattercake = new EggDecorator(aBattercake);
        aBattercake = new SausageDecorator(aBattercake);
        System.out.println(aBattercake.getDesc() + ": " + aBattercake.cost());
    }
}
